#ifndef PROTOCOL_H
#define PROTOCOL_H

#include    <QDebug>
#include    <QThread>
#include    "common.h"
class protocol:public  QThread
{
 Q_OBJECT

public:
    protocol();
    void run();
};
#define   FRAME_BUF_HEAD              0
#define   FRAME_BUF_BODY              1
#define   FRAME_BUF_HANDLE         2
#define   FRAME_BUF_FINISH            3
#define      FRAME_CTL_LEN_SIZE      20
struct  frame_ctl_s
{
    char  frame_head[FRAME_CTL_LEN_SIZE];
    INT8U  frame_head_pos;
    INT8U frame_buf_state;
};
Q_DECLARE_METATYPE(frame_ctl_s)
extern struct  frame_ctl_s frame_ctl;
#endif // PROTOCOL_H
